package com.atguigu.gmall.feign.cart;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.cart.entity.CartInfo;
import com.atguigu.gmall.model.cart.vo.AddCartVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("service-cart")
@RequestMapping("/api/inner/cart")
public interface CartFeginClient {

    @GetMapping("/addToCart")
    public Result<AddCartVO> addToCart(@RequestParam Long skuId, @RequestParam Integer skuNum);

    @GetMapping("/deleteChecked")
    public Result deleteChecked();


    /**
     * 获取购物车已选择的商品列表
     *
     * @return
     */
    @GetMapping("/checkedList")
    Result<List<CartInfo>> checkedList();
}
